package top.superflow.core.metadata.resource.jdbc

import top.superflow.core.annotation.{SemanticDropped, SemanticType}
import top.superflow.core.metadata.OldMetadata
import top.superflow.core.metadata.category.{Category, JdbcCategory}
import top.superflow.core.metadata.id.Identifier

import scala.beans.BeanProperty

class JdbcMetadata extends OldMetadata
{
  
  @BeanProperty
  protected var category : Category = new JdbcCategory
  
  override def getIdentifier : Identifier = new JdbcMetadataIdentifier
  
  @SemanticDropped(mode=SemanticType.KEYWORD, keyWords=Array("jdbc","url"), order=0)
  def getJdbcUrl : String = ???
  
  @SemanticDropped(mode=SemanticType.KEYWORD, keyWords=Array("driver", "class"), order=1)
  def getDriver : String = ???
  
  @SemanticDropped(mode=SemanticType.SYNONYM, keyWords=Array("pwd","password","getpassword", "getpwd"), order=3)
  def getPassword : String = ???
  
  @SemanticDropped(mode=SemanticType.SYNONYM, keyWords=Array("user","username","userid", "getuser","getusername", "getuserid"), order=2)
  def getUser : String = ???
}

object JdbcMetadata {
  def main(args: Array[String]): Unit = {
    val metadata : OldMetadata = new JdbcMetadata
    
    val supportedSemantics = metadata.getPromisedSemantics
    
    println(supportedSemantics)
  }
}
